import request from '@/utils/request'

export function getList(data) {
  return request({
    url: '/table/getList',
    method: 'post',
    data,
  })
}

export function doEdit(data) {
  return request({
    url: '/table/doEdit',
    method: 'post',
    data,
  })
}

export function doDelete(data) {
  return request({
    url: '/table/doDelete',
    method: 'post',
    data,
  })
}
//后台打卡任务查询书
export function FindBooks(params) {
  return request({
    url: '/Checktask/FindBooks',
    method: 'get',
    params,
  })
}

//后台添加字典
export function AddDict(data) {
  return request({
    url: '/SysConfig/AddDict',
    method: 'post',
    data,
  })
}
//后台编辑字典
export function SetDict(data) {
  return request({
    url: '/SysConfig/SetDict',
    method: 'post',
    data,
  })
}

//后台查询字典
export function GetDictListWithKeyName(params) {
  return request({
    url: '/SysConfig/GetDictListWithKeyName',
    method: 'get',
    params,
  })
}
//后台删除字典
export function DelDict(params) {
  return request({
    url: '/SysConfig/DelDict',
    method: 'get',
    params,
  })
}
//后台查询书
export function SysFindBooks(params) {
  return request({
    url: '/Book/SysFindBooks',
    method: 'get',
    params,
  })
}

export function SysDelBooks(params) {
  return request({
    url: '/Book/SysDelBooks',
    method: 'get',
    params,
  })
}
//后台添加书籍
export function AddBook(data) {
  return request({
    url: '/Book/AddBook',
    method: 'post',
    data,
  })
}
//后台编辑书信息
export function SysEditBooks(data) {
  return request({
    url: '/Book/SysEditBooks',
    method: 'post',
    data,
  })
}
//后台查询书的章节
export function SysFindBooksChapter(params) {
  return request({
    url: '/Book/SysFindBooksChapter',
    method: 'get',
    params,
  })
}

//后台查询书的章节内容
export function SysGetChapterFromBook(params) {
  return request({
    url: '/Book/SysGetChapterFromBook',
    method: 'get',
    params,
  })
}

//编辑章节内容
export function EditBooksChapter(data) {
  return request({
    url: '/Book/EditBooksChapter',
    method: 'post',
    data,
  })
}

//添加章节
export function AddBooksChapter(data) {
  return request({
    url: '/Book/AddBooksChapter',
    method: 'post',
    data,
  })
}

//删除章节
export function DelBooksChapter(params) {
  return request({
    url: '/Book/DelBooksChapter',
    method: 'get',
    params,
  })
}

//下架全部书
export function SysEditAlldelistingBooks(params) {
  return request({
    url: '/Book/SysEditAlldelistingBooks',
    method: 'get',
    params,
  })
}

//获取用户积分列表
export function GetUserScoreGetList(params) {
  return request({
    url: '/Point/GetUserScoreGetList',
    method: 'get',
    params,
  })
}

//获取分数段列表
export function GetScoreRangeList(params) {
  return request({
    url: '/SysConfig/GetScoreRangeList',
    method: 'get',
    params,
  })
}

//导出分数段列表
export function ScoreRange(params) {
  return request({
    url: '/Download/ScoreRange',
    method: 'get',
    params,
  })
}
